package data;

import java.util.List;

import data.exception.DaoException;

import bean.User;

/**
 * User DAO interface.
 * 
 * @author chuxiaoyuan
 */
public interface IUserDao extends IDao<User> {

	/**
	 * Select user by account and password.
	 * 
	 * @param account
	 *            the account.
	 * @param password
	 *            the password.
	 * @return the matched users.
	 */
	List<User> selectByAccountAndPassword(String account, String password)
			throws DaoException;

	/**
	 * Update the password of the specified user instance.
	 * 
	 * @param user
	 *            the user to be updated.
	 * @return the number of affected rows.
	 * @throws DaoException
	 *             update password failed.
	 */
	int updatePassword(User user) throws DaoException;
}
